3.4.5 \(\int \frac {\cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx\) [305]

Optimal. Leaf size=61 \[ -\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{b^3 d}+\frac {a \sin (c+d x)}{b^2 d}-\frac {\sin ^2(c+d x)}{2 b d} \]

[Out]

-(a^2-b^2)*ln(a+b*sin(d*x+c))/b^3/d+a*sin(d*x+c)/b^2/d-1/2*sin(d*x+c)^2/b/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2747, 711} \begin {gather*} -\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{b^3 d}+\frac {a \sin (c+d x)}{b^2 d}-\frac {\sin ^2(c+d x)}{2 b d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a + b*Sin[c + d*x]),x]

[Out]

-(((a^2 - b^2)*Log[a + b*Sin[c + d*x]])/(b^3*d)) + (a*Sin[c + d*x])/(b^2*d) - Sin[c + d*x]^2/(2*b*d)

Rule 711

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rule 2747

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {b^2-x^2}{a+x} \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\text {Subst}\left (\int \left (a-x+\frac {-a^2+b^2}{a+x}\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=-\frac {\left (a^2-b^2\right ) \log (a+b \sin (c+d x))}{b^3 d}+\frac {a \sin (c+d x)}{b^2 d}-\frac {\sin ^2(c+d x)}{2 b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 55, normalized size = 0.90 \begin {gather*} \frac {b^2 \cos (2 (c+d x))+4 \left (-a^2+b^2\right ) \log (a+b \sin (c+d x))+4 a b \sin (c+d x)}{4 b^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a + b*Sin[c + d*x]),x]

[Out]

(b^2*Cos[2*(c + d*x)] + 4*(-a^2 + b^2)*Log[a + b*Sin[c + d*x]] + 4*a*b*Sin[c + d*x])/(4*b^3*d)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 54, normalized size = 0.89

method result size
derivativedivides \(\frac {\frac {-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{b^{2}}+\frac {\left (-a^{2}+b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{3}}}{d}\) \(54\)
default \(\frac {\frac {-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{b^{2}}+\frac {\left (-a^{2}+b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{3}}}{d}\) \(54\)
risch \(\frac {i x \,a^{2}}{b^{3}}-\frac {i x}{b}+\frac {{\mathrm e}^{2 i \left (d x +c \right )}}{8 b d}-\frac {i a \,{\mathrm e}^{i \left (d x +c \right )}}{2 b^{2} d}+\frac {i a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 b^{2} d}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )}}{8 b d}+\frac {2 i a^{2} c}{b^{3} d}-\frac {2 i c}{b d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{b d}\) \(188\)
norman \(\frac {-\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b d}-\frac {2 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b d}+\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{2} d}+\frac {4 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2} d}+\frac {2 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2} d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {\left (a^{2}-b^{2}\right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{3} d}-\frac {\left (a^{2}-b^{2}\right ) \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{b^{3} d}\) \(190\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/b^2*(-1/2*sin(d*x+c)^2*b+a*sin(d*x+c))+(-a^2+b^2)/b^3*ln(a+b*sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 55, normalized size = 0.90 \begin {gather*} -\frac {\frac {b \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{b^{3}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*((b*sin(d*x + c)^2 - 2*a*sin(d*x + c))/b^2 + 2*(a^2 - b^2)*log(b*sin(d*x + c) + a)/b^3)/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 53, normalized size = 0.87 \begin {gather*} \frac {b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \sin \left (d x + c\right ) - 2 \, {\left (a^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{2 \, b^{3} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(b^2*cos(d*x + c)^2 + 2*a*b*sin(d*x + c) - 2*(a^2 - b^2)*log(b*sin(d*x + c) + a))/(b^3*d)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a+b*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 5.57, size = 56, normalized size = 0.92 \begin {gather*} -\frac {\frac {b \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} - b^{2}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{b^{3}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/2*((b*sin(d*x + c)^2 - 2*a*sin(d*x + c))/b^2 + 2*(a^2 - b^2)*log(abs(b*sin(d*x + c) + a))/b^3)/d

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 55, normalized size = 0.90 \begin {gather*} -\frac {\frac {{\sin \left (c+d\,x\right )}^2}{2\,b}+\frac {\ln \left (a+b\,\sin \left (c+d\,x\right )\right )\,\left (a^2-b^2\right )}{b^3}-\frac {a\,\sin \left (c+d\,x\right )}{b^2}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3/(a + b*sin(c + d*x)),x)

[Out]

-(sin(c + d*x)^2/(2*b) + (log(a + b*sin(c + d*x))*(a^2 - b^2))/b^3 - (a*sin(c + d*x))/b^2)/d

________________________________________________________________________________________